<%@taglib prefix="c"  uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@taglib prefix="page"  uri="/tags/fenye.tld" %>
<c:set var="webpath" value="${pageContext.request.contextPath}"></c:set>
<link href="${pageContext.request.contextPath}/user/css/imgPlayer.css" rel="stylesheet" type="text/css" />
 <link rel="shortcut icon" href="${pageContext.request.contextPath}/user/images/index/favicon.ico">
 <link rel="Bookmark" href="${pageContext.request.contextPath}/user/images/index/favicon.ico">


<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery/jquery1.7.min.js"></script>
<!-- link href="${pageContext.request.contextPath}/resource/css/jquery.alerts.css" rel="stylesheet" type="text/css" media="screen" /-->   
<!-- link href="${pageContext.request.contextPath}/resource/css/load.css" rel="stylesheet" type="text/css" media="screen" /-->
<!--  script src="${pageContext.request.contextPath}/user/js/jQuery.imgPlayer.js" type="text/javascript"></script-->
<!-- script src="${pageContext.request.contextPath}/user/js/base.js" type="text/javascript"></script-->

<fmt:setLocale value="zh_CN"/>
<fmt:setBundle basename="globalMessages" var="applicationBundle"/>
<c:set var="fmtNumber">
	<fmt:message key="fmtpattern" bundle="${applicationBundle}"></fmt:message>
</c:set>   
<c:set var="minFraction">
	<fmt:message key="minFraction" bundle="${applicationBundle}"></fmt:message>
</c:set>  

<c:set var="exit">
	<fmt:message key="exitMessage" bundle="${applicationBundle}"></fmt:message>
</c:set>   
<c:set var="alertMessage">
	<fmt:message key="alertMessage" bundle="${applicationBundle}"></fmt:message>
</c:set> 
<c:set var="alertinfo">
	<fmt:message key="alertinfo" bundle="${applicationBundle}"></fmt:message>
</c:set> 

<script type="text/javascript">
	
function backToLogin(){
	window.location.href = webContext+"/common/mustLogin.jsp";
}
var webContext = "${pageContext.request.contextPath}";
	function logout(){
		jConfirm('${exit}', '${alertMessage}', function(r) {
		
                  if(r){
                  	$.ajax({
						type : "post",
						cache : false,
						url : webContext+ "/loginAction!logout.action",
						data:{}, 
						dataType : "html",//jsonhtml
						beforeSend: function(XMLHttpRequest){
			     			// Handle the beforeSend event
							// alert("beforeSend");
			   			},
						success: function(data, textStatus){
							window.location.href=webContext+"/login.jsp";
						}
						});
                  }
              });
	}
	
	function infoAlert(info) {
		if(info){
			if(info!=""&&(info.replace(/(^\s*)|(\s*$)/g,""))!=""){
				jAlert('warning', info, '${alertinfo}',null,true);
			}
		}
	}
	
	function infoAlertNoModal(info) {
		jAlert('warning', info, '${alertinfo}',null,false);
	}
</script>
